<?php
/*
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <r.mujica.91@gmail.com> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return 
 * ----------------------------------------------------------------------------
 */

# includes POT main file
require_once('classes/OTS.php');

# getting configuration info to make the connection array
$driver = array('MySQL' => POT::DB_MYSQL, 'SQLite' => POT::DB_SQLITE, 'PostgreSQL' => POT::DB_PGSQL);
$conection = $cfg['db'];
$conection['driver'] = $driver[ $conection['type'] ];

# creates POT instance (or get existing one)
$ots = POT::getInstance();
try
{
	$ots->connect(null, $conection);
}
catch(PDOException $error)
{
	die('An unexpected error has ocurred. Please report to dev.' . '<br />Found in: ' . $error->getFile() . ' at line ' . $error->getLine());
}
?>